#include "Observer.hpp"
#include <memory>


using std::unique_ptr;

int main()
{
    unique_ptr<Subject> pFood(new Food);
    unique_ptr<Observer> pUser1(new User(pFood.get(), "熊大"));
    pFood->attach(pUser1.get());

    unique_ptr<Observer> pVipUser2(new VipUser(pFood.get(), "熊二"));
    pFood->attach(pVipUser2.get());

    unique_ptr<Observer> pUser3(new User(pFood.get(), "光头强"));
    pFood->attach(pUser3.get());

    Status * pfood = new FoodStatus(20, "红烧排骨");
    //美食信息变化之后，就会通知到所有用户
    pFood->setStatus(pfood);


    return 0;
}

